1. Field of the Invention
The present invention relates generally to the data processing field, and more particularly, to a method and system for detecting and reporting an excessive period of interrupt disablement in operating system programming in a data processing system.
2. Description of the Related Art
Operating system programming must frequently disable itself for interrupts when executing a “critical section” of code. Disablement is necessary for the code to serialize itself and to guarantee correctness. If, however, the amount of time spent disabled is excessive, performance problems can arise, particularly when the disablement conflicts with real time applications or with timing sensitive device drivers. Unfortunately, excessive periods of disablement are rarely detected, enabling them to escape into the field where they often lead to difficulties at customer sites.
One way to detect excessive periods of disablement of operating system programming is to add timing code on all critical paths of the operating system, in particular, those which either disable or enable for interrupts, and thereby accurately measure the disabled periods. Such an approach, however, would add significant overhead to an operating system since interrupt disablement and re-enablement is an extremely frequent and performance critical operation. Interrupt handling is also always disabled and would need to be timed in this manner, as well.
There is, accordingly, a need for a method and system for detecting and reporting an excessive period of interrupt disablement in operating system programming in a data processing system that does not add significant overhead to the operating system.